#ifndef DOCUMENT_H_
#define DOCUMENT_H_

#include <string>

class Visitor;

/*
 * The base class has the common interface.
 * The concrete class could has its own operations.
 */
class Document
{
public:
	virtual ~Document(void);

protected:
	Document(void);

public:
	virtual void setVisitor(Visitor&) = 0;

	void setName(const char*);
	const char* getName();

private:
	std::string m_sName;
};

class BackupDoc : public Document
{
public:
	BackupDoc(void);
	virtual ~BackupDoc(void);

public:
	void setVisitor(Visitor&);

	void operation1();
	void operation2();
};

class RestoreDoc : public Document
{
public:
	RestoreDoc(void);
	virtual ~RestoreDoc(void);

public:
	void setVisitor(Visitor&);

	void operationA();
	void operationB();
};

#endif // DOCUMENT_H_
